<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <link rel="stylesheet" href="../css/styledl.css">
  <title>Insert title here</title>
  <style>
    .photo{
      background: url("../images/LogIn.jpg");
      background-size:100%,100%;
    }
    .position{
      text-align: center;
      margin: auto;
    }
    .positionone{
      text-align: center;
      margin: auto;
      width: 80px;
      height: 40px;
    }
  </style>
  <script type="text/javascript">
    function check() {
      if (form1.account.value == "") {
        window.alert("账号不能为空！");
        form1.account.focus();
        return false;
      }
      if (form1.password.value == "") {
        window.alert("密码不能为空！");
        form1.password.focus();
        return false;
      }
      return true;
    }
  </script>
  <script>
    // 获取验证码
    function checkimg() {
      var yzmobj = document.getElementById("yzmimg");
      yzmobj.setAttribute("src", "Yzmservlet?" + Math.random());
    }
  </script>
</head>
<body class="photo" >
<div style="text-align: center">
  <div id="ftitle">
    <h3>图书馆欢迎您</h3>
  </div>
  <div id="formbound">
    <form method="post" name="form1" onSubmit="return check()"action="Login">

      <table class="position">
        <tr>
          <td>账 号:</td><td><input type="text" id="account" name="account" class="finput"></td><td></td>
        </tr>
        <tr>
          <td>密码:</td><td><input type="password" id="password" name="password" class="finput"></td><td></td>
        </tr>
        <tr>
          <td>验证码:</td><td><input class="finput" name="image" id="image" type="text"></td>
          <td><img src="Yzmservlet" id="yzmimg"  onclick="checkimg()" /></td>
        </tr>
      </table>
      <p>
        <input type="radio" id="radio-1" name="type" checked value="1" />
        <label><font color="white">学生</font></label>
        <input type="radio" id="radio-2" name="type" value="2" />
        <label><font color="white">教师</font></label>
        <input type="radio" id="radio-3" name="type" value="3" />
        <label><font color="white">管理员</font></label>
      </p>
      <p>
        <font color="red">${requestScope.imageMess}</font>
      </p>
      <p>
        <input id="denglu" class="positionone" type="submit" value="登录" />
      </p>
    </form>
  </div>
</div>
</body>
</html>
<!--class="fbutton"-->

